<?xml version="1.0" encoding="UTF-8"?>
<definitions 
  xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"
  xmlns:camunda="http://camunda.org/schema/1.0/bpmn"
  targetNamespace="Examples">

  <process id="asyncListenerSubProcess" isExecutable="true">
    <extensionElements>
      <camunda:executionListener event="end" class="org.camunda.bpm.engine.test.bpmn.executionlistener.RecorderExecutionListener" />
    </extensionElements>
  
    <startEvent id="start" />
    <sequenceFlow id="flow1" sourceRef="start" targetRef="subProcess" />
    
    <subProcess id="subProcess">
      <extensionElements>
        <camunda:executionListener event="end" class="org.camunda.bpm.engine.test.bpmn.executionlistener.RecorderExecutionListener" />
      </extensionElements>
      
      <startEvent id="subProcessStart" />
      <sequenceFlow id="flow2" sourceRef="subProcessStart" targetRef="subProcessTask" />
      <userTask id="subProcessTask" camunda:asyncBefore="true">
        <extensionElements>
          <camunda:executionListener event="end" class="org.camunda.bpm.engine.test.bpmn.executionlistener.RecorderExecutionListener" />
        </extensionElements>
      </userTask>
      <sequenceFlow id="flow3" sourceRef="subProcessTask" targetRef="subProcessEnd" />
      <endEvent id="subProcessEnd" />
    </subProcess>
    
    <sequenceFlow id="flow4" sourceRef="subProcess" targetRef="end" />
    <endEvent id="end" />
    
  </process>

</definitions>
